﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Panels="clr-namespace:_4chanManager.Panels"
        x:Class="_4chanManager.MainWindow"
        Title="ChanManager" Height="344.484" Width="585.523" ResizeMode="CanMinimize">
    <TabControl x:Name="tcTabs" HorizontalAlignment="Right" Height="294" Margin="0,10,10,0" VerticalAlignment="Top" Width="560" ItemsSource="{Binding}" SelectionChanged="TcTabs_OnSelectionChanged">
        <TabControl.Resources>
            <DataTemplate x:Key="TabHeader" DataType="TabItem">
                <DockPanel>
                    <Button Name="btnDelete" DockPanel.Dock="Right" Margin="5,0,0,0" Padding="0" Click="btnDelete_Click" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabItem}}, Path=Name}">
                        <Image Source="/delete.gif" Height="11" Width="11"></Image>
                    </Button>
                    <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=TabItem }, Path=Header}" />
                </DockPanel>
            </DataTemplate>
        </TabControl.Resources>
    </TabControl>
</Window>
